home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 975 b | 27 lines | [TEXT/GEOL] |
- Item 5958812 22-June-90 10:44PDT
-
- From: D4695 Skywalker Sys, Scott Collins,PRT
-
- To: VANPATTEN Van Patten, Don
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: RE[2]:CatchFailures & Methods
-
- Don,
-
- The two files in this package present a (C++) object that does failure
- handling stuff. You override the class FailureHandler to create a specific
- handler whose Recover function knows how to clean up your messes. You add a
- constructor that can tell the object about your local data. Then when you
- instantiate the object, it posts itself to the failure handler stack. You can
- remove it (Success) by calling its Revoke method. If you forget, it will
- automatically be Revoked when it goes out of scope. There is an example in the
- .h file.
-
- This way of dealing with failures is from a suggestion by Jeff Alger.
-
- hope this helps,
- -- Scott Collins
-
-